package mapmaker.thread;

import mapmaker.config.Config;
import mapmaker.log.Log;
import mapmaker.robot.Robot;

public class ThreadExplore implements Runnable {

	private Robot _robot;

	public ThreadExplore(Robot r){
		_robot = r;
	}

	@Override
	public void run() {
		while(true){
			try {
				Thread.sleep(Config.PERIOD_EXPLORER);
				Log.i(ThreadExplore.class.getSimpleName(), "Thread exploring");
				_robot.explore();
				Log.e(ThreadExplore.class.getSimpleName(), "Thread finish explored");
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}

}
